<template>
  <el-form ref="form" :model="form" :inline="true">
    <el-form-item label="唯一编码" prop="name">
      <el-input v-model="form.name" placeholder="请输入唯一编码" size="small" style="width: 240px"></el-input>
    </el-form-item>
    <el-form-item label="流程名称" prop="displayName">
      <el-input v-model="form.displayName" placeholder="请输入流程名称" size="small" style="width: 240px"></el-input>
    </el-form-item>
    <el-form-item label="状态" prop="orderState">
      <m-dict size="small" mode="searchForm" v-model="form.orderState" dict-key="wf_order_state"></m-dict>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" icon="el-icon-search" size="small" @click="handleSearch">查询</el-button>
      <el-button icon="el-icon-refresh" size="small" @click="resetform">重置</el-button>
    </el-form-item>
  </el-form>
</template>
<script>
export default {
  name: 'WfOrderSearch',
  props: {
  },
  data() {
    return {
      form: {
        name: undefined,
        displayName: undefined
      }
    }
  },
  methods: {
    // 搜索
    handleSearch(e) {
      this.$emit('on-search', this.form, e)
    },
    // 重置
    resetform(e) {
      this.$refs['form'].resetFields()
      this.$emit('on-reset', e)
    },
    // 获取表单数据
    getData() {
      var data = Object.assign({}, this.form)
      return data
    }
  }
}
</script>
